<template>
	<view class="nui_footer" v-if="list && list.length>0">
		<navigator class="footer-item" :class="index == current?'active':''" v-for="(item, index) in list" :key="index"  :url="item.path">
			<view class="iconfont" :class="item.icon"></view>
			<view class="footer-item-name">{{item.name}}</view>
		</navigator>
	</view>
</template>

<script>
	export default {
		name:"uni_footer",
		props:{
			list:{
				type:Array,
				default:[]
			},
			current:{
				type:[Number,String],
				default:'0'
			}
		},
		data() {
			return {
				
			};
		},
		onLoad() {
			
		},
		methods: {
		
		}
	}
</script>

<style lang="scss">
	.nui_footer{
		position: fixed;
		bottom: 0;
		left: 0;
		width: 100%;
		height: 100rpx;
		display: flex;
		justify-content: space-between;
		align-items:center;
		border-top: 1rpx solid $uni-border-color;
		.footer-item{
			width: 100%;
			display: flex;
			justify-content: center;
			align-items: center;
			flex-wrap: wrap;
			padding: 10rpx;
			box-sizing: border-box;
			color: $uni-text-color-grey;
			.footer-item-name{
				width: 100%;
				display: flex;
				justify-content: center;
				align-items: center;
				font-size: $uni-font-14;
			}
		}
		.footer-item.active{
			color: $uni-color-primary;
		}
	}
	
	
</style>
